import os

path="/Users/wanghui/Desktop/Study/Python_codes/day1/files"
files = os.listdir(path)

for f in files:
    if (not f.endswith('.gif')) and ("project30" in f or "commercial" in f):
        print(f)